local Action_PlayerLogin = {
    PlayerKey = 0;
}

-- 触发器激活时，即用户login时触发，将执行Action的Execute
function Action_PlayerLogin:Execute(...)
    print(string.format("Action_PlayerLogin:Execute PlayerKey[%d]", self.PlayerKey));

	local PlayerState = UGCGameSystem.GetPlayerStateByPlayerKey(self.PlayerKey)

	-- 登录时，为其分配位置√，固定4个人玩
	if PlayerState ~= nil and PlayerState.TeamIndex == 0 then
        print("success to enter distributeteam")
        UGCGameSystem.GameState:DisTributeTeamForPlayer(PlayerState)
    end

	return true
end

return Action_PlayerLogin